using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VFCHAR
    {
        public DataRow Convert2FCHAR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryFCHAR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["FCMANDANT"] = " ".PadRight(2 ); 
         dwReturn["FCCHAR"] = " ".PadRight(7 ); 
         dwReturn["FCART"] = " ".PadRight(20 ); 
         dwReturn["FCVAR"] = " ".PadRight(2 ); 
         dwReturn["FCFARBE"] = " ".PadRight(10 ); 
         dwReturn["FCGROE"] = " ".PadRight(7 ); 
         dwReturn["FCAUFM"] = " ".PadRight(2 ); 
         dwReturn["FCZS"] = " ".PadRight(2 ); 
         dwReturn["FCEINDAT"] = " ".PadRight(0 ); 
         dwReturn["FCENTKZ"] = " ".PadRight(1 ); 
         dwReturn["FCEINLO"] = " ".PadRight(2 ); 
         dwReturn["FCSPSTA"] = " ".PadRight(2 ); 
         dwReturn["FCSPGRD"] = " ".PadRight(2 ); 
         dwReturn["FCME"] = " ".PadRight(0 ); 
         dwReturn["FCEME"] = " ".PadRight(0 ); 
         dwReturn["FCEGEB"] = " ".PadRight(1 ); 
         dwReturn["FCGNRL"] = " ".PadRight(0 ); 
         dwReturn["FCGNRLPOS"] = " ".PadRight(0 ); 
         dwReturn["FCLIEFNR"] = " ".PadRight(8 ); 
         dwReturn["FCLIEFSCH"] = " ".PadRight(10 ); 
         dwReturn["FCLIEFDAT"] = " ".PadRight(0 ); 
         dwReturn["FCKZZOLL"] = " ".PadRight(1 ); 
         dwReturn["FCGEBANZ"] = " ".PadRight(0 ); 
         dwReturn["FCVPEINH"] = " ".PadRight(3 ); 
         dwReturn["FCAUFTYP"] = " ".PadRight(1 ); 
         dwReturn["FCBESTKRS"] = " ".PadRight(2 ); 
         dwReturn["FCBESTLFD"] = " ".PadRight(6 ); 
         dwReturn["FCBESTPOS"] = " ".PadRight(3 ); 
         dwReturn["FCABHS"] = " ".PadRight(0 ); 
         dwReturn["FCBUDGET"] = " ".PadRight(8 ); 
         dwReturn["FCRENR"] = " ".PadRight(10 ); 
         dwReturn["FCREDAT"] = " ".PadRight(0 ); 
         dwReturn["FCREWERT"] = " ".PadRight(0 ); 
         dwReturn["FCKZKONSI"] = " ".PadRight(1 ); 
         dwReturn["FCSTKNR"] = " ".PadRight(12 ); 
         dwReturn["FCFCODE"] = " ".PadRight(3 ); 
         dwReturn["FCHHK1"] = " ".PadRight(0 ); 
         dwReturn["FCHHK2"] = " ".PadRight(0 ); 
         dwReturn["FCHHK3"] = " ".PadRight(0 ); 
         dwReturn["FCHHK4"] = " ".PadRight(0 ); 
         dwReturn["FCHHK5"] = " ".PadRight(0 ); 
         dwReturn["FCHHK6"] = " ".PadRight(0 ); 
         dwReturn["FCHHK7"] = " ".PadRight(0 ); 
         dwReturn["FCHHK8"] = " ".PadRight(0 ); 
         dwReturn["FCHHK9"] = " ".PadRight(0 ); 
         dwReturn["FCHHK10"] = " ".PadRight(0 ); 
         dwReturn["FCHHKG"] = " ".PadRight(0 ); 
         dwReturn["FCAHK1"] = " ".PadRight(0 ); 
         dwReturn["FCAHK2"] = " ".PadRight(0 ); 
         dwReturn["FCAHK3"] = " ".PadRight(0 ); 
         dwReturn["FCAHK4"] = " ".PadRight(0 ); 
         dwReturn["FCAHK5"] = " ".PadRight(0 ); 
         dwReturn["FCAHK6"] = " ".PadRight(0 ); 
         dwReturn["FCAHK7"] = " ".PadRight(0 ); 
         dwReturn["FCAHK8"] = " ".PadRight(0 ); 
         dwReturn["FCAHK9"] = " ".PadRight(0 ); 
         dwReturn["FCAHK10"] = " ".PadRight(0 ); 
         dwReturn["FCAHKG"] = " ".PadRight(0 ); 
         dwReturn["FCABPZAB"] = " ".PadRight(0 ); 
         dwReturn["FCABDATAB"] = " ".PadRight(0 ); 
         dwReturn["FCTEILLFG"] = " ".PadRight(1 ); 
         dwReturn["FCEINLB"] = " ".PadRight(2 ); 
         dwReturn["FCSPEDF"] = " ".PadRight(1 ); 
         dwReturn["FCSPEDV"] = " ".PadRight(1 ); 
         dwReturn["FCSPEDZ"] = " ".PadRight(1 ); 
         dwReturn["FCURRENR"] = " ".PadRight(10 ); 
         dwReturn["FCARTGS"] = " ".PadRight(2 ); 
         dwReturn["FCVERF"] = " ".PadRight(5 ); 
         dwReturn["FCAVVME"] = " ".PadRight(1 ); 
         dwReturn["FCBEWPFL"] = " ".PadRight(1 ); 
         dwReturn["FCBEFREI"] = " ".PadRight(4 ); 
         dwReturn["FCURLAND"] = " ".PadRight(3 ); 
         dwReturn["FCIURLAND"] = " ".PadRight(2 ); 
         dwReturn["FCHALAND"] = " ".PadRight(3 ); 
         dwReturn["FCVSLAND"] = " ".PadRight(3 ); 
         dwReturn["FCVZWEIG"] = " ".PadRight(1 ); 
         dwReturn["FCTPMLKZ"] = " ".PadRight(3 ); 
         dwReturn["FCCONTV"] = " ".PadRight(1 ); 
         dwReturn["FCCONTNR"] = " ".PadRight(20 ); 
         dwReturn["FCZOLLST"] = " ".PadRight(6 ); 
         dwReturn["FCZOLLSTAF"] = " ".PadRight(6 ); 
         dwReturn["FCPRLAND"] = " ".PadRight(3 ); 
         dwReturn["FCURLANDWO"] = " ".PadRight(3 ); 
         dwReturn["FCBUSIMODE"] = " ".PadRight(3 ); 
         dwReturn["FCKUNDNRA"] = " ".PadRight(8 ); 
         dwReturn["FCKUNDADRE"] = " ".PadRight(8 ); 
         dwReturn["FCKUNDADRB"] = " ".PadRight(8 ); 
         dwReturn["FCKUNDNRR"] = " ".PadRight(8 ); 
         dwReturn["FCDRVERT"] = " ".PadRight(20 ); 
         dwReturn["FCCBOOKNO"] = " ".PadRight(15 ); 
         dwReturn["FCCITEMNO"] = " ".PadRight(0 ); 
         dwReturn["FCCVORDOC"] = " ".PadRight(10 ); 
         dwReturn["FCCGENEHM"] = " ".PadRight(22 ); 
         dwReturn["FCDOCT1"] = " ".PadRight(1 ); 
         dwReturn["FCDOCNB1"] = " ".PadRight(2 ); 
         dwReturn["FCDOCNO1"] = " ".PadRight(15 ); 
         dwReturn["FCDOCT2"] = " ".PadRight(1 ); 
         dwReturn["FCDOCNB2"] = " ".PadRight(2 ); 
         dwReturn["FCDOCNO2"] = " ".PadRight(15 ); 
         dwReturn["FCDOCT3"] = " ".PadRight(1 ); 
         dwReturn["FCDOCNB3"] = " ".PadRight(2 ); 
         dwReturn["FCDOCNO3"] = " ".PadRight(15 ); 
         dwReturn["FCDOCT4"] = " ".PadRight(1 ); 
         dwReturn["FCDOCNB4"] = " ".PadRight(2 ); 
         dwReturn["FCDOCNO4"] = " ".PadRight(15 ); 
         dwReturn["FCIVZWEIG"] = " ".PadRight(1 ); 
         dwReturn["FCFILLER"] = " ".PadRight(58 ); 
         dwReturn["FCAENDZL"] = " ".PadRight(0 ); 
         dwReturn["FCAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["FCAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["FCNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["FCNEUDAT"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapFCHAR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveFCHAR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryFCHAR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapFCHAR(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertFCHAR(dwLocal, ITXDBVERSION);
            }
            UpdateFCHAR(dwLocal);
        }
        public void InsertFCHAR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO FCHAR(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryFCHAR(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM FCHAR WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM FCHAR  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "FCHAR";
            Return = Result;
            return Return;
        }
        public void DeleteFCHAR(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM FCHAR   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateFCHAR(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE FCHAR SET "
                    +"FCMANDANT= :FCMANDANT,"
                    +"FCCHAR= :FCCHAR,"
                    +"FCART= :FCART,"
                    +"FCVAR= :FCVAR,"
                    +"FCFARBE= :FCFARBE,"
                    +"FCGROE= :FCGROE,"
                    +"FCAUFM= :FCAUFM,"
                    +"FCZS= :FCZS,"
                    +"FCEINDAT= :FCEINDAT,"
                    +"FCENTKZ= :FCENTKZ,"
                    +"FCEINLO= :FCEINLO,"
                    +"FCSPSTA= :FCSPSTA,"
                    +"FCSPGRD= :FCSPGRD,"
                    +"FCME= :FCME,"
                    +"FCEME= :FCEME,"
                    +"FCEGEB= :FCEGEB,"
                    +"FCGNRL= :FCGNRL,"
                    +"FCGNRLPOS= :FCGNRLPOS,"
                    +"FCLIEFNR= :FCLIEFNR,"
                    +"FCLIEFSCH= :FCLIEFSCH,"
                    +"FCLIEFDAT= :FCLIEFDAT,"
                    +"FCKZZOLL= :FCKZZOLL,"
                    +"FCGEBANZ= :FCGEBANZ,"
                    +"FCVPEINH= :FCVPEINH,"
                    +"FCAUFTYP= :FCAUFTYP,"
                    +"FCBESTKRS= :FCBESTKRS,"
                    +"FCBESTLFD= :FCBESTLFD,"
                    +"FCBESTPOS= :FCBESTPOS,"
                    +"FCABHS= :FCABHS,"
                    +"FCBUDGET= :FCBUDGET,"
                    +"FCRENR= :FCRENR,"
                    +"FCREDAT= :FCREDAT,"
                    +"FCREWERT= :FCREWERT,"
                    +"FCKZKONSI= :FCKZKONSI,"
                    +"FCSTKNR= :FCSTKNR,"
                    +"FCFCODE= :FCFCODE,"
                    +"FCHHK1= :FCHHK1,"
                    +"FCHHK2= :FCHHK2,"
                    +"FCHHK3= :FCHHK3,"
                    +"FCHHK4= :FCHHK4,"
                    +"FCHHK5= :FCHHK5,"
                    +"FCHHK6= :FCHHK6,"
                    +"FCHHK7= :FCHHK7,"
                    +"FCHHK8= :FCHHK8,"
                    +"FCHHK9= :FCHHK9,"
                    +"FCHHK10= :FCHHK10,"
                    +"FCHHKG= :FCHHKG,"
                    +"FCAHK1= :FCAHK1,"
                    +"FCAHK2= :FCAHK2,"
                    +"FCAHK3= :FCAHK3,"
                    +"FCAHK4= :FCAHK4,"
                    +"FCAHK5= :FCAHK5,"
                    +"FCAHK6= :FCAHK6,"
                    +"FCAHK7= :FCAHK7,"
                    +"FCAHK8= :FCAHK8,"
                    +"FCAHK9= :FCAHK9,"
                    +"FCAHK10= :FCAHK10,"
                    +"FCAHKG= :FCAHKG,"
                    +"FCABPZAB= :FCABPZAB,"
                    +"FCABDATAB= :FCABDATAB,"
                    +"FCTEILLFG= :FCTEILLFG,"
                    +"FCEINLB= :FCEINLB,"
                    +"FCSPEDF= :FCSPEDF,"
                    +"FCSPEDV= :FCSPEDV,"
                    +"FCSPEDZ= :FCSPEDZ,"
                    +"FCURRENR= :FCURRENR,"
                    +"FCARTGS= :FCARTGS,"
                    +"FCVERF= :FCVERF,"
                    +"FCAVVME= :FCAVVME,"
                    +"FCBEWPFL= :FCBEWPFL,"
                    +"FCBEFREI= :FCBEFREI,"
                    +"FCURLAND= :FCURLAND,"
                    +"FCIURLAND= :FCIURLAND,"
                    +"FCHALAND= :FCHALAND,"
                    +"FCVSLAND= :FCVSLAND,"
                    +"FCVZWEIG= :FCVZWEIG,"
                    +"FCTPMLKZ= :FCTPMLKZ,"
                    +"FCCONTV= :FCCONTV,"
                    +"FCCONTNR= :FCCONTNR,"
                    +"FCZOLLST= :FCZOLLST,"
                    +"FCZOLLSTAF= :FCZOLLSTAF,"
                    +"FCPRLAND= :FCPRLAND,"
                    +"FCURLANDWO= :FCURLANDWO,"
                    +"FCBUSIMODE= :FCBUSIMODE,"
                    +"FCKUNDNRA= :FCKUNDNRA,"
                    +"FCKUNDADRE= :FCKUNDADRE,"
                    +"FCKUNDADRB= :FCKUNDADRB,"
                    +"FCKUNDNRR= :FCKUNDNRR,"
                    +"FCDRVERT= :FCDRVERT,"
                    +"FCCBOOKNO= :FCCBOOKNO,"
                    +"FCCITEMNO= :FCCITEMNO,"
                    +"FCCVORDOC= :FCCVORDOC,"
                    +"FCCGENEHM= :FCCGENEHM,"
                    +"FCDOCT1= :FCDOCT1,"
                    +"FCDOCNB1= :FCDOCNB1,"
                    +"FCDOCNO1= :FCDOCNO1,"
                    +"FCDOCT2= :FCDOCT2,"
                    +"FCDOCNB2= :FCDOCNB2,"
                    +"FCDOCNO2= :FCDOCNO2,"
                    +"FCDOCT3= :FCDOCT3,"
                    +"FCDOCNB3= :FCDOCNB3,"
                    +"FCDOCNO3= :FCDOCNO3,"
                    +"FCDOCT4= :FCDOCT4,"
                    +"FCDOCNB4= :FCDOCNB4,"
                    +"FCDOCNO4= :FCDOCNO4,"
                    +"FCIVZWEIG= :FCIVZWEIG,"
                    +"FCFILLER= :FCFILLER,"
                    +"FCAENDZL= :FCAENDZL,"
                    +"FCAENDBEN= :FCAENDBEN,"
                    +"FCAENDDAT= :FCAENDDAT,"
                    +"FCNEUBEN= :FCNEUBEN,"
                    +"FCNEUDAT= :FCNEUDAT,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("FCMANDANT", OracleType.NVarChar).Value = dwData["FCMANDANT"].ToString(); 
          or1.Parameters.Add("FCCHAR", OracleType.NVarChar).Value = dwData["FCCHAR"].ToString(); 
          or1.Parameters.Add("FCART", OracleType.NVarChar).Value = dwData["FCART"].ToString(); 
          or1.Parameters.Add("FCVAR", OracleType.NVarChar).Value = dwData["FCVAR"].ToString(); 
          or1.Parameters.Add("FCFARBE", OracleType.NVarChar).Value = dwData["FCFARBE"].ToString(); 
          or1.Parameters.Add("FCGROE", OracleType.NVarChar).Value = dwData["FCGROE"].ToString(); 
          or1.Parameters.Add("FCAUFM", OracleType.NVarChar).Value = dwData["FCAUFM"].ToString(); 
          or1.Parameters.Add("FCZS", OracleType.NVarChar).Value = dwData["FCZS"].ToString(); 
          or1.Parameters.Add("FCEINDAT", OracleType.NVarChar).Value = dwData["FCEINDAT"].ToString(); 
          or1.Parameters.Add("FCENTKZ", OracleType.NVarChar).Value = dwData["FCENTKZ"].ToString(); 
          or1.Parameters.Add("FCEINLO", OracleType.NVarChar).Value = dwData["FCEINLO"].ToString(); 
          or1.Parameters.Add("FCSPSTA", OracleType.NVarChar).Value = dwData["FCSPSTA"].ToString(); 
          or1.Parameters.Add("FCSPGRD", OracleType.NVarChar).Value = dwData["FCSPGRD"].ToString(); 
          or1.Parameters.Add("FCME", OracleType.NVarChar).Value = dwData["FCME"].ToString(); 
          or1.Parameters.Add("FCEME", OracleType.NVarChar).Value = dwData["FCEME"].ToString(); 
          or1.Parameters.Add("FCEGEB", OracleType.NVarChar).Value = dwData["FCEGEB"].ToString(); 
          or1.Parameters.Add("FCGNRL", OracleType.NVarChar).Value = dwData["FCGNRL"].ToString(); 
          or1.Parameters.Add("FCGNRLPOS", OracleType.NVarChar).Value = dwData["FCGNRLPOS"].ToString(); 
          or1.Parameters.Add("FCLIEFNR", OracleType.NVarChar).Value = dwData["FCLIEFNR"].ToString(); 
          or1.Parameters.Add("FCLIEFSCH", OracleType.NVarChar).Value = dwData["FCLIEFSCH"].ToString(); 
          or1.Parameters.Add("FCLIEFDAT", OracleType.NVarChar).Value = dwData["FCLIEFDAT"].ToString(); 
          or1.Parameters.Add("FCKZZOLL", OracleType.NVarChar).Value = dwData["FCKZZOLL"].ToString(); 
          or1.Parameters.Add("FCGEBANZ", OracleType.NVarChar).Value = dwData["FCGEBANZ"].ToString(); 
          or1.Parameters.Add("FCVPEINH", OracleType.NVarChar).Value = dwData["FCVPEINH"].ToString(); 
          or1.Parameters.Add("FCAUFTYP", OracleType.NVarChar).Value = dwData["FCAUFTYP"].ToString(); 
          or1.Parameters.Add("FCBESTKRS", OracleType.NVarChar).Value = dwData["FCBESTKRS"].ToString(); 
          or1.Parameters.Add("FCBESTLFD", OracleType.NVarChar).Value = dwData["FCBESTLFD"].ToString(); 
          or1.Parameters.Add("FCBESTPOS", OracleType.NVarChar).Value = dwData["FCBESTPOS"].ToString(); 
          or1.Parameters.Add("FCABHS", OracleType.NVarChar).Value = dwData["FCABHS"].ToString(); 
          or1.Parameters.Add("FCBUDGET", OracleType.NVarChar).Value = dwData["FCBUDGET"].ToString(); 
          or1.Parameters.Add("FCRENR", OracleType.NVarChar).Value = dwData["FCRENR"].ToString(); 
          or1.Parameters.Add("FCREDAT", OracleType.NVarChar).Value = dwData["FCREDAT"].ToString(); 
          or1.Parameters.Add("FCREWERT", OracleType.NVarChar).Value = dwData["FCREWERT"].ToString(); 
          or1.Parameters.Add("FCKZKONSI", OracleType.NVarChar).Value = dwData["FCKZKONSI"].ToString(); 
          or1.Parameters.Add("FCSTKNR", OracleType.NVarChar).Value = dwData["FCSTKNR"].ToString(); 
          or1.Parameters.Add("FCFCODE", OracleType.NVarChar).Value = dwData["FCFCODE"].ToString(); 
          or1.Parameters.Add("FCHHK1", OracleType.NVarChar).Value = dwData["FCHHK1"].ToString(); 
          or1.Parameters.Add("FCHHK2", OracleType.NVarChar).Value = dwData["FCHHK2"].ToString(); 
          or1.Parameters.Add("FCHHK3", OracleType.NVarChar).Value = dwData["FCHHK3"].ToString(); 
          or1.Parameters.Add("FCHHK4", OracleType.NVarChar).Value = dwData["FCHHK4"].ToString(); 
          or1.Parameters.Add("FCHHK5", OracleType.NVarChar).Value = dwData["FCHHK5"].ToString(); 
          or1.Parameters.Add("FCHHK6", OracleType.NVarChar).Value = dwData["FCHHK6"].ToString(); 
          or1.Parameters.Add("FCHHK7", OracleType.NVarChar).Value = dwData["FCHHK7"].ToString(); 
          or1.Parameters.Add("FCHHK8", OracleType.NVarChar).Value = dwData["FCHHK8"].ToString(); 
          or1.Parameters.Add("FCHHK9", OracleType.NVarChar).Value = dwData["FCHHK9"].ToString(); 
          or1.Parameters.Add("FCHHK10", OracleType.NVarChar).Value = dwData["FCHHK10"].ToString(); 
          or1.Parameters.Add("FCHHKG", OracleType.NVarChar).Value = dwData["FCHHKG"].ToString(); 
          or1.Parameters.Add("FCAHK1", OracleType.NVarChar).Value = dwData["FCAHK1"].ToString(); 
          or1.Parameters.Add("FCAHK2", OracleType.NVarChar).Value = dwData["FCAHK2"].ToString(); 
          or1.Parameters.Add("FCAHK3", OracleType.NVarChar).Value = dwData["FCAHK3"].ToString(); 
          or1.Parameters.Add("FCAHK4", OracleType.NVarChar).Value = dwData["FCAHK4"].ToString(); 
          or1.Parameters.Add("FCAHK5", OracleType.NVarChar).Value = dwData["FCAHK5"].ToString(); 
          or1.Parameters.Add("FCAHK6", OracleType.NVarChar).Value = dwData["FCAHK6"].ToString(); 
          or1.Parameters.Add("FCAHK7", OracleType.NVarChar).Value = dwData["FCAHK7"].ToString(); 
          or1.Parameters.Add("FCAHK8", OracleType.NVarChar).Value = dwData["FCAHK8"].ToString(); 
          or1.Parameters.Add("FCAHK9", OracleType.NVarChar).Value = dwData["FCAHK9"].ToString(); 
          or1.Parameters.Add("FCAHK10", OracleType.NVarChar).Value = dwData["FCAHK10"].ToString(); 
          or1.Parameters.Add("FCAHKG", OracleType.NVarChar).Value = dwData["FCAHKG"].ToString(); 
          or1.Parameters.Add("FCABPZAB", OracleType.NVarChar).Value = dwData["FCABPZAB"].ToString(); 
          or1.Parameters.Add("FCABDATAB", OracleType.NVarChar).Value = dwData["FCABDATAB"].ToString(); 
          or1.Parameters.Add("FCTEILLFG", OracleType.NVarChar).Value = dwData["FCTEILLFG"].ToString(); 
          or1.Parameters.Add("FCEINLB", OracleType.NVarChar).Value = dwData["FCEINLB"].ToString(); 
          or1.Parameters.Add("FCSPEDF", OracleType.NVarChar).Value = dwData["FCSPEDF"].ToString(); 
          or1.Parameters.Add("FCSPEDV", OracleType.NVarChar).Value = dwData["FCSPEDV"].ToString(); 
          or1.Parameters.Add("FCSPEDZ", OracleType.NVarChar).Value = dwData["FCSPEDZ"].ToString(); 
          or1.Parameters.Add("FCURRENR", OracleType.NVarChar).Value = dwData["FCURRENR"].ToString(); 
          or1.Parameters.Add("FCARTGS", OracleType.NVarChar).Value = dwData["FCARTGS"].ToString(); 
          or1.Parameters.Add("FCVERF", OracleType.NVarChar).Value = dwData["FCVERF"].ToString(); 
          or1.Parameters.Add("FCAVVME", OracleType.NVarChar).Value = dwData["FCAVVME"].ToString(); 
          or1.Parameters.Add("FCBEWPFL", OracleType.NVarChar).Value = dwData["FCBEWPFL"].ToString(); 
          or1.Parameters.Add("FCBEFREI", OracleType.NVarChar).Value = dwData["FCBEFREI"].ToString(); 
          or1.Parameters.Add("FCURLAND", OracleType.NVarChar).Value = dwData["FCURLAND"].ToString(); 
          or1.Parameters.Add("FCIURLAND", OracleType.NVarChar).Value = dwData["FCIURLAND"].ToString(); 
          or1.Parameters.Add("FCHALAND", OracleType.NVarChar).Value = dwData["FCHALAND"].ToString(); 
          or1.Parameters.Add("FCVSLAND", OracleType.NVarChar).Value = dwData["FCVSLAND"].ToString(); 
          or1.Parameters.Add("FCVZWEIG", OracleType.NVarChar).Value = dwData["FCVZWEIG"].ToString(); 
          or1.Parameters.Add("FCTPMLKZ", OracleType.NVarChar).Value = dwData["FCTPMLKZ"].ToString(); 
          or1.Parameters.Add("FCCONTV", OracleType.NVarChar).Value = dwData["FCCONTV"].ToString(); 
          or1.Parameters.Add("FCCONTNR", OracleType.NVarChar).Value = dwData["FCCONTNR"].ToString(); 
          or1.Parameters.Add("FCZOLLST", OracleType.NVarChar).Value = dwData["FCZOLLST"].ToString(); 
          or1.Parameters.Add("FCZOLLSTAF", OracleType.NVarChar).Value = dwData["FCZOLLSTAF"].ToString(); 
          or1.Parameters.Add("FCPRLAND", OracleType.NVarChar).Value = dwData["FCPRLAND"].ToString(); 
          or1.Parameters.Add("FCURLANDWO", OracleType.NVarChar).Value = dwData["FCURLANDWO"].ToString(); 
          or1.Parameters.Add("FCBUSIMODE", OracleType.NVarChar).Value = dwData["FCBUSIMODE"].ToString(); 
          or1.Parameters.Add("FCKUNDNRA", OracleType.NVarChar).Value = dwData["FCKUNDNRA"].ToString(); 
          or1.Parameters.Add("FCKUNDADRE", OracleType.NVarChar).Value = dwData["FCKUNDADRE"].ToString(); 
          or1.Parameters.Add("FCKUNDADRB", OracleType.NVarChar).Value = dwData["FCKUNDADRB"].ToString(); 
          or1.Parameters.Add("FCKUNDNRR", OracleType.NVarChar).Value = dwData["FCKUNDNRR"].ToString(); 
          or1.Parameters.Add("FCDRVERT", OracleType.NVarChar).Value = dwData["FCDRVERT"].ToString(); 
          or1.Parameters.Add("FCCBOOKNO", OracleType.NVarChar).Value = dwData["FCCBOOKNO"].ToString(); 
          or1.Parameters.Add("FCCITEMNO", OracleType.NVarChar).Value = dwData["FCCITEMNO"].ToString(); 
          or1.Parameters.Add("FCCVORDOC", OracleType.NVarChar).Value = dwData["FCCVORDOC"].ToString(); 
          or1.Parameters.Add("FCCGENEHM", OracleType.NVarChar).Value = dwData["FCCGENEHM"].ToString(); 
          or1.Parameters.Add("FCDOCT1", OracleType.NVarChar).Value = dwData["FCDOCT1"].ToString(); 
          or1.Parameters.Add("FCDOCNB1", OracleType.NVarChar).Value = dwData["FCDOCNB1"].ToString(); 
          or1.Parameters.Add("FCDOCNO1", OracleType.NVarChar).Value = dwData["FCDOCNO1"].ToString(); 
          or1.Parameters.Add("FCDOCT2", OracleType.NVarChar).Value = dwData["FCDOCT2"].ToString(); 
          or1.Parameters.Add("FCDOCNB2", OracleType.NVarChar).Value = dwData["FCDOCNB2"].ToString(); 
          or1.Parameters.Add("FCDOCNO2", OracleType.NVarChar).Value = dwData["FCDOCNO2"].ToString(); 
          or1.Parameters.Add("FCDOCT3", OracleType.NVarChar).Value = dwData["FCDOCT3"].ToString(); 
          or1.Parameters.Add("FCDOCNB3", OracleType.NVarChar).Value = dwData["FCDOCNB3"].ToString(); 
          or1.Parameters.Add("FCDOCNO3", OracleType.NVarChar).Value = dwData["FCDOCNO3"].ToString(); 
          or1.Parameters.Add("FCDOCT4", OracleType.NVarChar).Value = dwData["FCDOCT4"].ToString(); 
          or1.Parameters.Add("FCDOCNB4", OracleType.NVarChar).Value = dwData["FCDOCNB4"].ToString(); 
          or1.Parameters.Add("FCDOCNO4", OracleType.NVarChar).Value = dwData["FCDOCNO4"].ToString(); 
          or1.Parameters.Add("FCIVZWEIG", OracleType.NVarChar).Value = dwData["FCIVZWEIG"].ToString(); 
          or1.Parameters.Add("FCFILLER", OracleType.NVarChar).Value = dwData["FCFILLER"].ToString(); 
          or1.Parameters.Add("FCAENDZL", OracleType.NVarChar).Value = dwData["FCAENDZL"].ToString(); 
          or1.Parameters.Add("FCAENDBEN", OracleType.NVarChar).Value = dwData["FCAENDBEN"].ToString(); 
          or1.Parameters.Add("FCAENDDAT", OracleType.NVarChar).Value = dwData["FCAENDDAT"].ToString(); 
          or1.Parameters.Add("FCNEUBEN", OracleType.NVarChar).Value = dwData["FCNEUBEN"].ToString(); 
          or1.Parameters.Add("FCNEUDAT", OracleType.NVarChar).Value = dwData["FCNEUDAT"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
